<%-- 
    Document : createelection.jsp
    author : Mishal Parmar
    Date   : 21 Oct 2012
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="java.util.ArrayList"%>
<%@page import="dbhandler.AccessRole"%>
<%@page import="entityclasses.roles"%>
<%@page import="dbhandler.EventType"%>
<%@page import="entityclasses.eventtype"%>

<!DOCTYPE html>
<html>
    <head>
        
        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="images/main.css">
	<script type="text/javascript" language="javascript" src="images/prototype-1.js"></script>
	<script type="text/javascript" language="javascript" src="images/prototype-base-extensions.js"></script>
	<script type="text/javascript" language="javascript" src="images/prototype-date-extensions.js"></script>
	<script type="text/javascript" language="javascript" src="images/behaviour.js"></script>
	<script type="text/javascript" language="javascript" src="images/datepicker.js"></script>
	<link rel="stylesheet" href="images/datepicker.css">
        
	<script type="text/javascript" language="javascript" src="images/behaviors.js"></script>
                                                
    </head>
    <body>
        
        
<%
      
            AccessRole role=new AccessRole();
            EventType type=new EventType();
            
            ArrayList usrrol=new ArrayList();
            ArrayList etype=new ArrayList();
            
            usrrol=role.accessuser();
            etype=type.eventtype();
            
            roles useraccess=new roles();
            eventtype typeofevent=new eventtype();
            
            
        
        
%>
        <h2> Create Election </h2>
        <form name="createelection" method="post" action="../createElection">
            
            	<div style="float:left; width:100px; margin-left: 30px;">Voting start</div> 
                <input name="starttime" id="starttime" class="datetimepicker"/>
                <br clear="all"/><br />
                
                <div style="float:left; width:100px; margin-left: 30px;">Voting End</div> 
                <input name="endtime" id="endtime" class="datetimepicker"/>
                <br clear="all"/><br />
                
                <div style="float:left; width:100px; margin-left: 30px;">Nominee start</div> 
                <input name="nomineestart" id="nomineestart" class="datetimepicker"/>
        	<br clear="all"/><br />
                
                <div style="float:left; width:100px; margin-left: 30px;">Nominee End</div> 
                <input name="nomineeend" id="nomineeend" class="datetimepicker"/>
                <br clear="all"/><br />
                
                   
                <div style="float:left; width:100px; margin-left: 30px;">Event Member</div> 
                
                
        <%
        for(int i=0;i<usrrol.size();i++)
        {
            useraccess=(roles) usrrol.get(i);
        
        out.println("<input type='radio' name='accesstype' value='"+useraccess.getRole_id()+"'/>" + useraccess.getRole_name());
        }
        %>
        
            
    
            <br clear="all"/><br />
              <%
        for(int i=0;i<etype.size();i++)
        {
            typeofevent=(eventtype) etype.get(i);
           
        
        out.println("<input type='hidden' name='eventtype' value='1'>");
        }
        %>
        
        <div style="margin-left: 50px; margin-top: 10px;">
                <br>
                <input type="submit" value="Create Election" name="submit"/>
            </div>   
        </form>
        
        
    </body>
</html>
